<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <a class="navbar-brand" href="/">EasyVocab</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="nav me-auto mb-2 mb-lg-0">
            <li class="nav-item"><a class="nav-link text-light" href="dictionary">Dictionary</a></li>
            <li class="nav-item dropdown">
                <div class="nav-link text-light" id="navbar-help" role="button" data-bs-toggle="dropdown"
                     aria-expanded="false">
                    Help
                </div>
                <ul class="dropdown-menu" aria-labelledby="navbar-help">
                    <li><a class="dropdown-item" href="https://github.com/dukechain2333/EasyVocab/issues">
                        Open an issue on GitHub</a></li>
                    <li><a class="dropdown-item" href="mailto:chain_13918925958@outlook.com">Contact me</a></li>
                </ul>
            </li>
            <li class="nav-item">
                <form class="d-flex" action="/dicsearch" method="post">
                    {% csrf_token %}
                    <input class="form-control me-2" name="search" type="search" placeholder="Search"
                           aria-label="Search">
                    <button class="btn btn-outline-success" type="submit">Search</button>
                </form>
            </li>
        </ul>
        <div class="d-flex">
            {% if request.session.is_login %}
                <div class="nav-item dropdown">
                    <div class="nav-link text-light" id="navbar-account" role="button" data-bs-toggle="dropdown"
                         aria-expanded="false">
                        Account
                    </div>
                    <ul class="dropdown-menu" aria-labelledby="navbar-account">
                        <li><label class="dropdown-item disabled">{{ request.session.user_name }}</label></li>
                    </ul>
                </div>
                <a class="btn btn-outline-light text-nowrap" id="logout" href="/logout">Log out</a>
            {% else %}
                <a class="btn btn-outline-light text-nowrap" id="login" href="/login">Log in</a>
            {% endif %}
        </div>
    </div>
</nav>